//
//  JCClubReportHomeVC.m
//  SquashSpark
//
//  Created by 郭吉成 on 2017/11/22.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import "JCClubReportHomeVC.h"
#import "JCCreatClubTVC.h"

@interface JCClubReportHomeVC ()

@property (weak, nonatomic) IBOutlet UIButton *sendButton;
@property (weak, nonatomic) IBOutlet UIButton *viewButton;

@end

@implementation JCClubReportHomeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initCode];
}

- (void)initCode{
    _sendButton.layer.cornerRadius =
    _viewButton.layer.cornerRadius = 3;
    _sendButton.layer.masksToBounds =
    _viewButton.layer.masksToBounds = YES;
    
    self.navigationItem.title = @"Sports Report";
}

- (IBAction)creatClubAction:(UIButton *)sender {
    __weak typeof(self)weakSelf = self;
    FUIAlertView *alertv = [FUIAlertView alertWithTitle:nil message:@"Manage your members, the institutional movement plan, and give your advice" cancelTitle:nil confirmTitle:@"Create Club"];
    [alertv setOnOkAction:^{
        [weakSelf.navigationController pushViewController:[[UIStoryboard storyboardWithName:@"Clubs" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"JCCreatClubTVC"] animated:YES];
    }];
    alertv.isDismissOnTap = YES;
    [alertv show];
}

- (IBAction)joinClubAction:(UIButton *)sender {
    __weak typeof(self)weakSelf = self;
    FUIAlertView *alertv = [FUIAlertView alertWithTitle:nil message:@"Join clubs to receive sports reviews and daily reports from coaches" cancelTitle:nil confirmTitle:@"Join The Club"];
    [alertv setOnOkAction:^{
        [weakSelf.navigationController popViewControllerAnimated:YES];
        if (_dismissHandle) {
            _dismissHandle();
        }
    }];
    alertv.isDismissOnTap = YES;
    [alertv show];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
